<template>
    <div>
      <h1 style="position:relative;left:400px;top:10px;font-weight: bold;size: 30px">评论列表</h1>
      <el-button type="success" @click="returnNew" style="position: relative;left: 630px;top:-35px">返回新闻列表</el-button>
      <el-table
        :data="tableData"
        border
        style="width: 100%;position: relative; left: -20px;top: 20px;">
        <el-table-column
          prop="c_id"
          label="新闻编号"
          width="200">
        </el-table-column>
        <el-table-column
          prop="c_detail"
          label="新闻标题"
          width="250">
        </el-table-column>
        <el-table-column
          prop="contentUser"
          label="新闻摘要"
          width="250">
        </el-table-column>
        <el-table-column
          prop="c_Time"
          label="作者"
          width="321">
        </el-table-column>
      </el-table>
    </div>
</template>
<script>
export default {
  methods: {
    /**
     * 查看评论
     *
     * */
    returnNew () {
      this.$router.push({path: '/newsList'})
    }
  },
  data () {
    return {
      tableData: [{
        c_id: 1,
        c_detail: '详细信息',
        contentUser: '在成',
        c_Time: '2020-09-06'
      }]
    }
  },
  created () {
    alert(this.$route.query.id)
    this.$http.get('http://localhost:8086/feignContentInfo/', {params: {n_id: this.$route.query.id}}).then(resp => {
      this.tableData = resp.data
    })
  }
}
</script>
<style scoped>
</style>
